import request from '@/utils/request'
import qs from 'qs'

/* 根据id查询 StudyType */
export function getStudyTypeApi(id) {
  return request({
    url: `/studyType/${id}`,
    method: 'get'
  })
}
/* 条件、分页查询 StudyType */
export function getStudyTypesApi(pageNo, pageSize, studyType) {
  return request({
    url: `/studyType?${qs.stringify(studyType)}`,
    params:{
      pageNo: pageNo,
      pageSize: pageSize,
    },
    method: 'get'
  })
}
/* 根据id删除 StudyType */
export function delStudyTypeApi(id) {
  return request({
    url: `/studyType/${id}`,
    method: 'delete'
  })
}
/* 批量删除 StudyType */
export function delStudyTypesApi(studyTypes) {
  return request({
    url: `/studyType`,
    data:studyTypes,
    method: 'delete'
  })
}
/* 修改 StudyType */
export function updateStudyTypeApi(form) {
  return request({
    url: `/studyType`,
    method: 'put',
    data:form,
  })
}
/* 新增 StudyType */
export function addStudyTypeApi(form) {
  return request({
    url: `/studyType`,
    method: 'post',
    data:form,
  })
}